$(function () {
    $('#page').load('page.html');
})

function pointTableFandAll() {
    let data=myAjax("/point/pointTableFandAll","","get");
    data=data.list;
    let html='';
    for (let i=0;i<data.length;i++){
        html +='        <tr>\n' +
            '            <td>'+data[i].id+'</td>\n' +
            '            <td>'+data[i].name+'</td>\n' +
            '            <td>'+data[i].groupName+'</td>\n' +
            '            <td>'+data[i].state+'</td>\n' +
            '            <td>'+data[i].arrive+'</td>\n' +
            '            <td>'+data[i].time+'</td>\n' +
            '        </tr>';
    }
    $("#pointTableFandAll").html(html);
}


function FindAll() {
    let da={
        name:$.trim($("#name").val()),
        groupName:$.trim($("#groupName").val()),
        state:$.trim($("#state").val()),
        startdate:$("#startdate").val(),
        endtdate:$("#endtdate").val(),
        pageSize:$("#pageSize").val(),
        pageNum:$("#pageNum").val(),
    }
    let data=myAjax("/point/conditionFind",da,"post");
    $("#pageCount").text(data.number);
    data=data.list;
    let html='';
    for (let i=0;i<data.length;i++){
        html +='        <tr>\n' +
            '            <td>'+data[i].id+'</td>\n' +
            '            <td>'+data[i].name+'</td>\n' +
            '            <td>'+data[i].groupName+'</td>\n' +
            '            <td>'+data[i].state+'</td>\n' +
            '            <td>'+data[i].arrive+'</td>\n' +
            '            <td>'+data[i].time+'</td>\n' +
            '        </tr>';
    }
    $("#pointTableFandAll").html(html);
}


function dateDelete() {
    let da={
        startdate:$("#startDateTwo").val(),
        endtdate:$("#endDateTwo").val(),
    }
    let data=myAjax("/point/dateDelete",da,"post");
    data=data.result;
    if (data!=0){
        alert("删除成功！");
        $('#middle-reght').load('pointtable/pointtable.html');
    }else {
        alert("删除失败！")
    }
}